{% extends 'index.html' %}
{% block title %} {{ page_title }} {% endblock %}

{% block styles %}
    <link rel="stylesheet" type="text/css" href="/static/monitor.css" />
    <link rel="stylesheet" type="text/css" href="/static/scans.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/south-street/jquery-ui-1.8.11.custom.css" />
{% endblock %}

{% block scripts %}
    <script type="text/javascript" language="javascript" src="/static/js/result.display.js"></script>
{% endblock %}

{% block sidebar %}
{% endblock %}

{% block messages %}
    <div class="message-content">
        {% for message in messages %}
        <div class="{{ message.type }}">
            <img src="/static/images/spacer.gif" class="ui-icon-active ui-icon-{{ message.type }}" />
            <span>
            {{ message.body }}
            {% if message.url %}
                <a href="{{ message.url}}">{{ message.url_text }}</a>
            {% endif %}
            </span>
        </div>
        {% endfor %}
    </div>
{% endblock %}

{% block content %}
    <div class="container">
        <table class="r6 result-table">
            <tr class="headline">
                <th>Resource</th>
                <th>Hostname - IP address</th>
                <th>Screenshots</th>
                <th>Dumps</th>
                <th>Schedule</th>
                <th>Action</th>
            </tr>
            {% if results|length > 0 %}
            {% for result in results %}
            <tr class="{% cycle 'odd' 'even' %} row">
                <td>{{ result.link }}</td>
                <td>
                    <ul>
                        <h4>Alias list</h4>
                        <span>{{ result.ip_links }}</span>
                        <span>{{ result.ip_alias }}</span>
                        <span>{{ result.ip_links }}</span>
                    </ul>
                </td>
                <td>{{ result.screenshot }}</td>
                <td>{{ result.screenshot }}</td>
                <td></td>
                <td class="link-actions">
                    <a href="#/meta/{{ result.id }}" rel="id-{{ result.id }}">
                        <img src="/static/images/spacer.gif" class="ui-icon ui-icon-script" title="View headers"/>
                    </a>
                </td>
            </tr>
            <tr class="meta row id-{{ result.id }}">
                <td colspan="2" class="align-center">
                    <span>Meta</span>
                </td>
                <td colspan="4">
                    <div class="headers">
                    <table>
                        {% autoescape off %}
                        {{ result.headers }}
                        {% endautoescape %} 
                    </table>
                    </div>
                </td>
            </tr>
            {% endfor %}
            {% endif %}
        </table>
    </div>
{% endblock %}